﻿@using Jhong.FunMVC.Razor
@using Jhong.FunMVCBlog.Controllers
@using Jhong.FunMVCBlog.Core.Entity
@{
    RazorHTMLHelper.Layout = "/Views/Shared/_LayoutPage.cshtml";
}
@{
    var data = (IList<Articles>)@ViewData["data"];
}
@if (false == string.IsNullOrWhiteSpace(@ViewData["nav"]))
{
    @RazorHTMLHelper.Raw(@ViewData["nav"])
}
@foreach (var item in data)
{
    <article class="panel panel-default">
        <header class="panel-heading">
            <h3 class="panel-title">
                <a href="/Home/Article/@item.ID">@item.Title</a>
            </h3>
        </header>
        <div class="panel-meta text-right">
            <span class="author">@HomeController.GetCategoryName(item.CategoryID)</span>
            <time pubdate="">/@item.PublishTime</time>
        </div>
        <div class="panel-body">
            @RazorHTMLHelper.Raw(item.Summary)
            <a href="/Home/Article/@item.ID">阅读全文</a>
        </div>
        @RazorHTMLHelper.Raw(HomeController.GetTagName(item.ID))
    </article>
}
@RazorHTMLHelper.Raw(@ViewData["page"])